<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!--提现页面 -->
<section class="main-content withdraw view">
	<form autocomplete="off" class="ivu-form ivu-form-label-right">
		<div class="label-height ivu-form-item"><label class="ivu-form-item-label" style="width: 100px;">提现金额：</label>
			<div class="ivu-form-item-content" style="margin-left: 100px;">
				<input type="number" class="bankMoney" placeholder="请输入提现金额">
				<span class="span-c-currentDaMa" style="font-size: 14px;color:red;"></span>
				<!---->
			</div>
		</div>
		<div class="label-height ivu-form-item"><label class="ivu-form-item-label" style="width: 100px;">提现至：</label>
			<div class="ivu-form-item-content" style="margin-left: 100px;">
				<ul>
					<li class="choose">
					<span id="bankName"></span>
					<span id="bankNum"></span> 
					<span>
					</span><i class="iconfont icon-choose"></i></li>
				</ul>
			</div>
		</div>
		<div class="label-height ivu-form-item"><label class="ivu-form-item-label" style="width: 100px;">资金密码：</label>
			<div class="ivu-form-item-content" style="margin-left: 100px;"><input class="capital" type="password" autocomplete="new-password" placeholder="请输入资金密码">
			</div>
		</div>
		
		<div class="label-height ivu-form-item"><label class="ivu-form-item-label" style="width: 100px;">备注：</label>
			<div class="ivu-form-item-content" style="margin-left: 100px;"><input type="text" autocomplete="beizhu" class="beizhu" >
			</div>
		</div>
	</form> <button disabled="disabled" class="button withdraw-button">提现</button>
	<table>
		
	<tbody id="userInfo">
			<tr>
				<td >账户余额</td>
				<td class="user-balance"></td>
				<td>单笔限额</td>
				<td class="user-term"></td>
			</tr>
			<tr>
				<td>可提金额</td>
				<td class="user-money"></td>
				<td>今日已提次数</td>
				<td class="user-counts"></td>
			</tr>
			<tr>
				<td>取款时间</td>
				<td class="user-time"></td>
				<td>每日限制次数</td>
				<td class="user-termCounts"></td>
			</tr>
			<tr>
				<td>今日已提金额</td>
				<td class="user-jine"></td>
				<td>每日限制金额</td>
				<td class="user-termJine"></td>
			</tr>
			<tr>
				<td>手续费说明</td>
				<td colspan="3" class="user-shouxufei">每日免手续费次数：99999次。 超出次数按(提款金额＊0.00%)收取</td>
			</tr>
		</tbody>
	</table>
	<!---->
</section>
<script type="text/javascript">
 findMoneyPwd(); 
findUserDrawingInfo();
$.post('/users/getBankid.do', {}, function(result) {
	var newData = result.data;
	if(newData.bankNum == null) {
		layer.open({
			type: 1,
			area: ['300px', "200px"],
			title: '温馨提示',
			shadeClose: false, //点击遮罩关闭
			anim: 4,
			content: '亲，你还未绑定银行卡，请绑定后设置资金密码再来提款', //右边也可以自己定义样式，引用时最外面的那个id,如$("#"+"ID名")
			btn: '知道了',
			yes: function(layero, index) {
				layer.close(layer.index);
				window.location.href = "/pc/personal.do#userCenter"
			},
			cancel: function(layero, index) {
				layer.close(layer.index);
				window.location.href = "/pc/personal.do#userCenter"
			},
		});
		return;
	}
	if(newData.zhifupass == null) {
		layer.open({
			type: 1,
			area: ['300px', "200px"],
			title: '温馨提示',
			shadeClose: false, //点击遮罩关闭
			anim: 4,
			content: '亲，您还没有设置资金密码,请设置后再来提款', //右边也可以自己定义样式，引用时最外面的那个id,如$("#"+"ID名")
			btn: '知道了',
			yes: function(layero, index) {
				layer.close(layer.index);
				window.location.href = "/pc/personal.do#userCenter"
				
			},
			cancel: function(layero, index) {
				layer.close(layer.index);
				window.location.href = "/pc/personal.do#userCenter"
			},
		});
		return;
	}
})
$.ajax({
	url: "/users/userDamal.do",
	type: "post",
	data: {
		money: $(".bankMoney").val()
	},
	success: function(data) {
		$(".span-c-currentDaMa").text(data.data)
	}
})
withdraw()	
</script>
